//
//  MusicViewController.m
//  SinceLe
//
//  Created by 李祎 on 15/11/12.
//  Copyright © 2015年 李元喜. All rights reserved.
//

#import "MusicViewController.h"

@interface MusicViewController ()<UIScrollViewDelegate>

@property (weak, nonatomic) IBOutlet UIScrollView *NewScrollerView;

@property (weak, nonatomic) IBOutlet UILabel *LineLabel;
@property (strong, nonatomic) IBOutlet UIButton *HomeButton;
@property (strong, nonatomic) IBOutlet UIButton *SomeButton;
@property (strong, nonatomic) IBOutlet UIButton *therrButton;


@end

@implementation MusicViewController

-(instancetype)init{
    if (self = [super init]) {
        self.title = @"音乐";
        self.tabBarItem.image = [UIImage imageNamed:@"tabbar_music"];
    }
    return self;
}

- (void)viewDidLoad {
    [super viewDidLoad];
  
    self.automaticallyAdjustsScrollViewInsets = NO;
    self.NewScrollerView.delegate = self;
    _NewScrollerView.pagingEnabled = YES;
    
    
    
//    [self  loadeHeadButtonClick];
}

//点击方法
- (IBAction)HomePageClick:(id)sender {
    
    
    
    self.NewScrollerView.contentOffset = CGPointMake(self.view.frame.size.width * 0, 0);
    self.LineLabel.frame = CGRectMake(self.view.frame.size.width /3 * 0, self.LineLabel.frame.origin.y, self.LineLabel.frame.size.width, self.LineLabel.frame.size.height);
   

}

- (IBAction)SongMenuClick:(id)sender {
    self.NewScrollerView.contentOffset = CGPointMake(self.view.frame.size.width * 1, 0);
    self.LineLabel.frame = CGRectMake(self.view.frame.size.width /3 * 1, self.LineLabel.frame.origin.y, self.LineLabel.frame.size.width, self.LineLabel.frame.size.height);
    
}


- (IBAction)ListClick:(id)sender {
    
    self.NewScrollerView.contentOffset = CGPointMake(self.view.frame.size.width * 2, 0);
    self.LineLabel.frame = CGRectMake(self.view.frame.size.width /3 * 2, self.LineLabel.frame.origin.y, self.LineLabel.frame.size.width, self.LineLabel.frame.size.height);
}



//滑动scrollerView代理
- (void)scrollViewDidScroll:(UIScrollView *)scrollView
{
    self.LineLabel.frame = CGRectMake( scrollView.contentOffset.x / 3, self.LineLabel.frame.origin.y, self.LineLabel.frame.size.width, self.LineLabel.frame.size.height);
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


@end
